Left Termination of the query pattern fl_in_3(a, g, a) w.r.t. the given Prolog program could not be shown:



Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof

Clauses:

fl([], [], 0).
fl(.(E, X), R, s(Z)) :- ','(append(E, Y, R), fl(X, Y, Z)).
append([], X, X).
append(.(X, Xs), Ys, .(X, Zs)) :- append(Xs, Ys, Zs).

Queries:

fl(a,g,a).

We use the technique of [30]. With regard to the inferred argument filtering the predicates were used in the following modes:
fl_in: (f,b,f)
append_in: (f,f,b)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

fl_in_aga([], [], 0) → fl_out_aga([], [], 0)
fl_in_aga(.(E, X), R, s(Z)) → U1_aga(E, X, R, Z, append_in_aag(E, Y, R))
append_in_aag([], X, X) → append_out_aag([], X, X)
append_in_aag(.(X, Xs), Ys, .(X, Zs)) → U3_aag(X, Xs, Ys, Zs, append_in_aag(Xs, Ys, Zs))
U3_aag(X, Xs, Ys, Zs, append_out_aag(Xs, Ys, Zs)) → append_out_aag(.(X, Xs), Ys, .(X, Zs))
U1_aga(E, X, R, Z, append_out_aag(E, Y, R)) → U2_aga(E, X, R, Z, fl_in_aga(X, Y, Z))
U2_aga(E, X, R, Z, fl_out_aga(X, Y, Z)) → fl_out_aga(.(E, X), R, s(Z))

The argument filtering Pi contains the following mapping:
fl_in_aga(x1, x2, x3)  =  fl_in_aga(x2)
[]  =  []
fl_out_aga(x1, x2, x3)  =  fl_out_aga(x1, x3)
U1_aga(x1, x2, x3, x4, x5)  =  U1_aga(x5)
append_in_aag(x1, x2, x3)  =  append_in_aag(x3)
append_out_aag(x1, x2, x3)  =  append_out_aag(x1, x2)
.(x1, x2)  =  .(x1, x2)
U3_aag(x1, x2, x3, x4, x5)  =  U3_aag(x1, x5)
U2_aga(x1, x2, x3, x4, x5)  =  U2_aga(x1, x5)
s(x1)  =  s(x1)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof
  ↳ PrologToPiTRSProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

fl_in_aga([], [], 0) → fl_out_aga([], [], 0)
fl_in_aga(.(E, X), R, s(Z)) → U1_aga(E, X, R, Z, append_in_aag(E, Y, R))
append_in_aag([], X, X) → append_out_aag([], X, X)
append_in_aag(.(X, Xs), Ys, .(X, Zs)) → U3_aag(X, Xs, Ys, Zs, append_in_aag(Xs, Ys, Zs))
U3_aag(X, Xs, Ys, Zs, append_out_aag(Xs, Ys, Zs)) → append_out_aag(.(X, Xs), Ys, .(X, Zs))
U1_aga(E, X, R, Z, append_out_aag(E, Y, R)) → U2_aga(E, X, R, Z, fl_in_aga(X, Y, Z))
U2_aga(E, X, R, Z, fl_out_aga(X, Y, Z)) → fl_out_aga(.(E, X), R, s(Z))

The argument filtering Pi contains the following mapping:
fl_in_aga(x1, x2, x3)  =  fl_in_aga(x2)
[]  =  []
fl_out_aga(x1, x2, x3)  =  fl_out_aga(x1, x3)
U1_aga(x1, x2, x3, x4, x5)  =  U1_aga(x5)
append_in_aag(x1, x2, x3)  =  append_in_aag(x3)
append_out_aag(x1, x2, x3)  =  append_out_aag(x1, x2)
.(x1, x2)  =  .(x1, x2)
U3_aag(x1, x2, x3, x4, x5)  =  U3_aag(x1, x5)
U2_aga(x1, x2, x3, x4, x5)  =  U2_aga(x1, x5)
s(x1)  =  s(x1)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

FL_IN_AGA(.(E, X), R, s(Z)) → U1_AGA(E, X, R, Z, append_in_aag(E, Y, R))
FL_IN_AGA(.(E, X), R, s(Z)) → APPEND_IN_AAG(E, Y, R)
APPEND_IN_AAG(.(X, Xs), Ys, .(X, Zs)) → U3_AAG(X, Xs, Ys, Zs, append_in_aag(Xs, Ys, Zs))
APPEND_IN_AAG(.(X, Xs), Ys, .(X, Zs)) → APPEND_IN_AAG(Xs, Ys, Zs)
U1_AGA(E, X, R, Z, append_out_aag(E, Y, R)) → U2_AGA(E, X, R, Z, fl_in_aga(X, Y, Z))
U1_AGA(E, X, R, Z, append_out_aag(E, Y, R)) → FL_IN_AGA(X, Y, Z)

The TRS R consists of the following rules:

fl_in_aga([], [], 0) → fl_out_aga([], [], 0)
fl_in_aga(.(E, X), R, s(Z)) → U1_aga(E, X, R, Z, append_in_aag(E, Y, R))
append_in_aag([], X, X) → append_out_aag([], X, X)
append_in_aag(.(X, Xs), Ys, .(X, Zs)) → U3_aag(X, Xs, Ys, Zs, append_in_aag(Xs, Ys, Zs))
U3_aag(X, Xs, Ys, Zs, append_out_aag(Xs, Ys, Zs)) → append_out_aag(.(X, Xs), Ys, .(X, Zs))
U1_aga(E, X, R, Z, append_out_aag(E, Y, R)) → U2_aga(E, X, R, Z, fl_in_aga(X, Y, Z))
U2_aga(E, X, R, Z, fl_out_aga(X, Y, Z)) → fl_out_aga(.(E, X), R, s(Z))

The argument filtering Pi contains the following mapping:
fl_in_aga(x1, x2, x3)  =  fl_in_aga(x2)
[]  =  []
fl_out_aga(x1, x2, x3)  =  fl_out_aga(x1, x3)
U1_aga(x1, x2, x3, x4, x5)  =  U1_aga(x5)
append_in_aag(x1, x2, x3)  =  append_in_aag(x3)
append_out_aag(x1, x2, x3)  =  append_out_aag(x1, x2)
.(x1, x2)  =  .(x1, x2)
U3_aag(x1, x2, x3, x4, x5)  =  U3_aag(x1, x5)
U2_aga(x1, x2, x3, x4, x5)  =  U2_aga(x1, x5)
s(x1)  =  s(x1)
APPEND_IN_AAG(x1, x2, x3)  =  APPEND_IN_AAG(x3)
FL_IN_AGA(x1, x2, x3)  =  FL_IN_AGA(x2)
U2_AGA(x1, x2, x3, x4, x5)  =  U2_AGA(x1, x5)
U1_AGA(x1, x2, x3, x4, x5)  =  U1_AGA(x5)
U3_AAG(x1, x2, x3, x4, x5)  =  U3_AAG(x1, x5)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

FL_IN_AGA(.(E, X), R, s(Z)) → U1_AGA(E, X, R, Z, append_in_aag(E, Y, R))
FL_IN_AGA(.(E, X), R, s(Z)) → APPEND_IN_AAG(E, Y, R)
APPEND_IN_AAG(.(X, Xs), Ys, .(X, Zs)) → U3_AAG(X, Xs, Ys, Zs, append_in_aag(Xs, Ys, Zs))
APPEND_IN_AAG(.(X, Xs), Ys, .(X, Zs)) → APPEND_IN_AAG(Xs, Ys, Zs)
U1_AGA(E, X, R, Z, append_out_aag(E, Y, R)) → U2_AGA(E, X, R, Z, fl_in_aga(X, Y, Z))
U1_AGA(E, X, R, Z, append_out_aag(E, Y, R)) → FL_IN_AGA(X, Y, Z)

The TRS R consists of the following rules:

fl_in_aga([], [], 0) → fl_out_aga([], [], 0)
fl_in_aga(.(E, X), R, s(Z)) → U1_aga(E, X, R, Z, append_in_aag(E, Y, R))
append_in_aag([], X, X) → append_out_aag([], X, X)
append_in_aag(.(X, Xs), Ys, .(X, Zs)) → U3_aag(X, Xs, Ys, Zs, append_in_aag(Xs, Ys, Zs))
U3_aag(X, Xs, Ys, Zs, append_out_aag(Xs, Ys, Zs)) → append_out_aag(.(X, Xs), Ys, .(X, Zs))
U1_aga(E, X, R, Z, append_out_aag(E, Y, R)) → U2_aga(E, X, R, Z, fl_in_aga(X, Y, Z))
U2_aga(E, X, R, Z, fl_out_aga(X, Y, Z)) → fl_out_aga(.(E, X), R, s(Z))

The argument filtering Pi contains the following mapping:
fl_in_aga(x1, x2, x3)  =  fl_in_aga(x2)
[]  =  []
fl_out_aga(x1, x2, x3)  =  fl_out_aga(x1, x3)
U1_aga(x1, x2, x3, x4, x5)  =  U1_aga(x5)
append_in_aag(x1, x2, x3)  =  append_in_aag(x3)
append_out_aag(x1, x2, x3)  =  append_out_aag(x1, x2)
.(x1, x2)  =  .(x1, x2)
U3_aag(x1, x2, x3, x4, x5)  =  U3_aag(x1, x5)
U2_aga(x1, x2, x3, x4, x5)  =  U2_aga(x1, x5)
s(x1)  =  s(x1)
APPEND_IN_AAG(x1, x2, x3)  =  APPEND_IN_AAG(x3)
FL_IN_AGA(x1, x2, x3)  =  FL_IN_AGA(x2)
U2_AGA(x1, x2, x3, x4, x5)  =  U2_AGA(x1, x5)
U1_AGA(x1, x2, x3, x4, x5)  =  U1_AGA(x5)
U3_AAG(x1, x2, x3, x4, x5)  =  U3_AAG(x1, x5)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 2 SCCs with 3 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

APPEND_IN_AAG(.(X, Xs), Ys, .(X, Zs)) → APPEND_IN_AAG(Xs, Ys, Zs)

The TRS R consists of the following rules:

fl_in_aga([], [], 0) → fl_out_aga([], [], 0)
fl_in_aga(.(E, X), R, s(Z)) → U1_aga(E, X, R, Z, append_in_aag(E, Y, R))
append_in_aag([], X, X) → append_out_aag([], X, X)
append_in_aag(.(X, Xs), Ys, .(X, Zs)) → U3_aag(X, Xs, Ys, Zs, append_in_aag(Xs, Ys, Zs))
U3_aag(X, Xs, Ys, Zs, append_out_aag(Xs, Ys, Zs)) → append_out_aag(.(X, Xs), Ys, .(X, Zs))
U1_aga(E, X, R, Z, append_out_aag(E, Y, R)) → U2_aga(E, X, R, Z, fl_in_aga(X, Y, Z))
U2_aga(E, X, R, Z, fl_out_aga(X, Y, Z)) → fl_out_aga(.(E, X), R, s(Z))

The argument filtering Pi contains the following mapping:
fl_in_aga(x1, x2, x3)  =  fl_in_aga(x2)
[]  =  []
fl_out_aga(x1, x2, x3)  =  fl_out_aga(x1, x3)
U1_aga(x1, x2, x3, x4, x5)  =  U1_aga(x5)
append_in_aag(x1, x2, x3)  =  append_in_aag(x3)
append_out_aag(x1, x2, x3)  =  append_out_aag(x1, x2)
.(x1, x2)  =  .(x1, x2)
U3_aag(x1, x2, x3, x4, x5)  =  U3_aag(x1, x5)
U2_aga(x1, x2, x3, x4, x5)  =  U2_aga(x1, x5)
s(x1)  =  s(x1)
APPEND_IN_AAG(x1, x2, x3)  =  APPEND_IN_AAG(x3)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

APPEND_IN_AAG(.(X, Xs), Ys, .(X, Zs)) → APPEND_IN_AAG(Xs, Ys, Zs)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
APPEND_IN_AAG(x1, x2, x3)  =  APPEND_IN_AAG(x3)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

APPEND_IN_AAG(.(X, Zs)) → APPEND_IN_AAG(Zs)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

FL_IN_AGA(.(E, X), R, s(Z)) → U1_AGA(E, X, R, Z, append_in_aag(E, Y, R))
U1_AGA(E, X, R, Z, append_out_aag(E, Y, R)) → FL_IN_AGA(X, Y, Z)

The TRS R consists of the following rules:

fl_in_aga([], [], 0) → fl_out_aga([], [], 0)
fl_in_aga(.(E, X), R, s(Z)) → U1_aga(E, X, R, Z, append_in_aag(E, Y, R))
append_in_aag([], X, X) → append_out_aag([], X, X)
append_in_aag(.(X, Xs), Ys, .(X, Zs)) → U3_aag(X, Xs, Ys, Zs, append_in_aag(Xs, Ys, Zs))
U3_aag(X, Xs, Ys, Zs, append_out_aag(Xs, Ys, Zs)) → append_out_aag(.(X, Xs), Ys, .(X, Zs))
U1_aga(E, X, R, Z, append_out_aag(E, Y, R)) → U2_aga(E, X, R, Z, fl_in_aga(X, Y, Z))
U2_aga(E, X, R, Z, fl_out_aga(X, Y, Z)) → fl_out_aga(.(E, X), R, s(Z))

The argument filtering Pi contains the following mapping:
fl_in_aga(x1, x2, x3)  =  fl_in_aga(x2)
[]  =  []
fl_out_aga(x1, x2, x3)  =  fl_out_aga(x1, x3)
U1_aga(x1, x2, x3, x4, x5)  =  U1_aga(x5)
append_in_aag(x1, x2, x3)  =  append_in_aag(x3)
append_out_aag(x1, x2, x3)  =  append_out_aag(x1, x2)
.(x1, x2)  =  .(x1, x2)
U3_aag(x1, x2, x3, x4, x5)  =  U3_aag(x1, x5)
U2_aga(x1, x2, x3, x4, x5)  =  U2_aga(x1, x5)
s(x1)  =  s(x1)
FL_IN_AGA(x1, x2, x3)  =  FL_IN_AGA(x2)
U1_AGA(x1, x2, x3, x4, x5)  =  U1_AGA(x5)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

FL_IN_AGA(.(E, X), R, s(Z)) → U1_AGA(E, X, R, Z, append_in_aag(E, Y, R))
U1_AGA(E, X, R, Z, append_out_aag(E, Y, R)) → FL_IN_AGA(X, Y, Z)

The TRS R consists of the following rules:

append_in_aag([], X, X) → append_out_aag([], X, X)
append_in_aag(.(X, Xs), Ys, .(X, Zs)) → U3_aag(X, Xs, Ys, Zs, append_in_aag(Xs, Ys, Zs))
U3_aag(X, Xs, Ys, Zs, append_out_aag(Xs, Ys, Zs)) → append_out_aag(.(X, Xs), Ys, .(X, Zs))

The argument filtering Pi contains the following mapping:
[]  =  []
append_in_aag(x1, x2, x3)  =  append_in_aag(x3)
append_out_aag(x1, x2, x3)  =  append_out_aag(x1, x2)
.(x1, x2)  =  .(x1, x2)
U3_aag(x1, x2, x3, x4, x5)  =  U3_aag(x1, x5)
s(x1)  =  s(x1)
FL_IN_AGA(x1, x2, x3)  =  FL_IN_AGA(x2)
U1_AGA(x1, x2, x3, x4, x5)  =  U1_AGA(x5)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ RuleRemovalProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

FL_IN_AGA(R) → U1_AGA(append_in_aag(R))
U1_AGA(append_out_aag(E, Y)) → FL_IN_AGA(Y)

The TRS R consists of the following rules:

append_in_aag(X) → append_out_aag([], X)
append_in_aag(.(X, Zs)) → U3_aag(X, append_in_aag(Zs))
U3_aag(X, append_out_aag(Xs, Ys)) → append_out_aag(.(X, Xs), Ys)

The set Q consists of the following terms:

append_in_aag(x0)
U3_aag(x0, x1)

We have to consider all (P,Q,R)-chains.
By using the rule removal processor [15] with the following polynomial ordering [25], at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.

Strictly oriented rules of the TRS R:

append_in_aag(.(X, Zs)) → U3_aag(X, append_in_aag(Zs))

Used ordering: POLO with Polynomial interpretation [25]:

POL(.(x1, x2)) = 1 + 2·x1 + 2·x2   
POL(FL_IN_AGA(x1)) = 2·x1   
POL(U1_AGA(x1)) = x1   
POL(U3_aag(x1, x2)) = 1 + 2·x1 + 2·x2   
POL([]) = 0   
POL(append_in_aag(x1)) = 2·x1   
POL(append_out_aag(x1, x2)) = x1 + 2·x2   



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ RuleRemovalProof
QDP
                            ↳ UsableRulesProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

FL_IN_AGA(R) → U1_AGA(append_in_aag(R))
U1_AGA(append_out_aag(E, Y)) → FL_IN_AGA(Y)

The TRS R consists of the following rules:

append_in_aag(X) → append_out_aag([], X)
U3_aag(X, append_out_aag(Xs, Ys)) → append_out_aag(.(X, Xs), Ys)

The set Q consists of the following terms:

append_in_aag(x0)
U3_aag(x0, x1)

We have to consider all (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ RuleRemovalProof
                          ↳ QDP
                            ↳ UsableRulesProof
QDP
                                ↳ QReductionProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

FL_IN_AGA(R) → U1_AGA(append_in_aag(R))
U1_AGA(append_out_aag(E, Y)) → FL_IN_AGA(Y)

The TRS R consists of the following rules:

append_in_aag(X) → append_out_aag([], X)

The set Q consists of the following terms:

append_in_aag(x0)
U3_aag(x0, x1)

We have to consider all (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

U3_aag(x0, x1)



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ RuleRemovalProof
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
QDP
                                    ↳ Rewriting
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

FL_IN_AGA(R) → U1_AGA(append_in_aag(R))
U1_AGA(append_out_aag(E, Y)) → FL_IN_AGA(Y)

The TRS R consists of the following rules:

append_in_aag(X) → append_out_aag([], X)

The set Q consists of the following terms:

append_in_aag(x0)

We have to consider all (P,Q,R)-chains.
By rewriting [15] the rule FL_IN_AGA(R) → U1_AGA(append_in_aag(R)) at position [0] we obtained the following new rules:

FL_IN_AGA(R) → U1_AGA(append_out_aag([], R))



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ RuleRemovalProof
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ Rewriting
QDP
                                        ↳ UsableRulesProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

FL_IN_AGA(R) → U1_AGA(append_out_aag([], R))
U1_AGA(append_out_aag(E, Y)) → FL_IN_AGA(Y)

The TRS R consists of the following rules:

append_in_aag(X) → append_out_aag([], X)

The set Q consists of the following terms:

append_in_aag(x0)

We have to consider all (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ RuleRemovalProof
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ UsableRulesProof
QDP
                                            ↳ QReductionProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

FL_IN_AGA(R) → U1_AGA(append_out_aag([], R))
U1_AGA(append_out_aag(E, Y)) → FL_IN_AGA(Y)

R is empty.
The set Q consists of the following terms:

append_in_aag(x0)

We have to consider all (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

append_in_aag(x0)



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ RuleRemovalProof
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ UsableRulesProof
                                          ↳ QDP
                                            ↳ QReductionProof
QDP
                                                ↳ Instantiation
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

FL_IN_AGA(R) → U1_AGA(append_out_aag([], R))
U1_AGA(append_out_aag(E, Y)) → FL_IN_AGA(Y)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By instantiating [15] the rule U1_AGA(append_out_aag(E, Y)) → FL_IN_AGA(Y) we obtained the following new rules:

U1_AGA(append_out_aag([], z0)) → FL_IN_AGA(z0)



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ RuleRemovalProof
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ UsableRulesProof
                                          ↳ QDP
                                            ↳ QReductionProof
                                              ↳ QDP
                                                ↳ Instantiation
QDP
                                                    ↳ NonTerminationProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U1_AGA(append_out_aag([], z0)) → FL_IN_AGA(z0)
FL_IN_AGA(R) → U1_AGA(append_out_aag([], R))

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

The TRS P consists of the following rules:

U1_AGA(append_out_aag([], z0)) → FL_IN_AGA(z0)
FL_IN_AGA(R) → U1_AGA(append_out_aag([], R))

The TRS R consists of the following rules:none


s = FL_IN_AGA(R) evaluates to t =FL_IN_AGA(R)

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

FL_IN_AGA(R)U1_AGA(append_out_aag([], R))
with rule FL_IN_AGA(R') → U1_AGA(append_out_aag([], R')) at position [] and matcher [R' / R]

U1_AGA(append_out_aag([], R))FL_IN_AGA(R)
with rule U1_AGA(append_out_aag([], z0)) → FL_IN_AGA(z0)

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.




We use the technique of [30]. With regard to the inferred argument filtering the predicates were used in the following modes:
fl_in: (f,b,f)
append_in: (f,f,b)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

fl_in_aga([], [], 0) → fl_out_aga([], [], 0)
fl_in_aga(.(E, X), R, s(Z)) → U1_aga(E, X, R, Z, append_in_aag(E, Y, R))
append_in_aag([], X, X) → append_out_aag([], X, X)
append_in_aag(.(X, Xs), Ys, .(X, Zs)) → U3_aag(X, Xs, Ys, Zs, append_in_aag(Xs, Ys, Zs))
U3_aag(X, Xs, Ys, Zs, append_out_aag(Xs, Ys, Zs)) → append_out_aag(.(X, Xs), Ys, .(X, Zs))
U1_aga(E, X, R, Z, append_out_aag(E, Y, R)) → U2_aga(E, X, R, Z, fl_in_aga(X, Y, Z))
U2_aga(E, X, R, Z, fl_out_aga(X, Y, Z)) → fl_out_aga(.(E, X), R, s(Z))

The argument filtering Pi contains the following mapping:
fl_in_aga(x1, x2, x3)  =  fl_in_aga(x2)
[]  =  []
fl_out_aga(x1, x2, x3)  =  fl_out_aga(x1, x2, x3)
U1_aga(x1, x2, x3, x4, x5)  =  U1_aga(x3, x5)
append_in_aag(x1, x2, x3)  =  append_in_aag(x3)
append_out_aag(x1, x2, x3)  =  append_out_aag(x1, x2, x3)
.(x1, x2)  =  .(x1, x2)
U3_aag(x1, x2, x3, x4, x5)  =  U3_aag(x1, x4, x5)
U2_aga(x1, x2, x3, x4, x5)  =  U2_aga(x1, x3, x5)
s(x1)  =  s(x1)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

fl_in_aga([], [], 0) → fl_out_aga([], [], 0)
fl_in_aga(.(E, X), R, s(Z)) → U1_aga(E, X, R, Z, append_in_aag(E, Y, R))
append_in_aag([], X, X) → append_out_aag([], X, X)
append_in_aag(.(X, Xs), Ys, .(X, Zs)) → U3_aag(X, Xs, Ys, Zs, append_in_aag(Xs, Ys, Zs))
U3_aag(X, Xs, Ys, Zs, append_out_aag(Xs, Ys, Zs)) → append_out_aag(.(X, Xs), Ys, .(X, Zs))
U1_aga(E, X, R, Z, append_out_aag(E, Y, R)) → U2_aga(E, X, R, Z, fl_in_aga(X, Y, Z))
U2_aga(E, X, R, Z, fl_out_aga(X, Y, Z)) → fl_out_aga(.(E, X), R, s(Z))

The argument filtering Pi contains the following mapping:
fl_in_aga(x1, x2, x3)  =  fl_in_aga(x2)
[]  =  []
fl_out_aga(x1, x2, x3)  =  fl_out_aga(x1, x2, x3)
U1_aga(x1, x2, x3, x4, x5)  =  U1_aga(x3, x5)
append_in_aag(x1, x2, x3)  =  append_in_aag(x3)
append_out_aag(x1, x2, x3)  =  append_out_aag(x1, x2, x3)
.(x1, x2)  =  .(x1, x2)
U3_aag(x1, x2, x3, x4, x5)  =  U3_aag(x1, x4, x5)
U2_aga(x1, x2, x3, x4, x5)  =  U2_aga(x1, x3, x5)
s(x1)  =  s(x1)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

FL_IN_AGA(.(E, X), R, s(Z)) → U1_AGA(E, X, R, Z, append_in_aag(E, Y, R))
FL_IN_AGA(.(E, X), R, s(Z)) → APPEND_IN_AAG(E, Y, R)
APPEND_IN_AAG(.(X, Xs), Ys, .(X, Zs)) → U3_AAG(X, Xs, Ys, Zs, append_in_aag(Xs, Ys, Zs))
APPEND_IN_AAG(.(X, Xs), Ys, .(X, Zs)) → APPEND_IN_AAG(Xs, Ys, Zs)
U1_AGA(E, X, R, Z, append_out_aag(E, Y, R)) → U2_AGA(E, X, R, Z, fl_in_aga(X, Y, Z))
U1_AGA(E, X, R, Z, append_out_aag(E, Y, R)) → FL_IN_AGA(X, Y, Z)

The TRS R consists of the following rules:

fl_in_aga([], [], 0) → fl_out_aga([], [], 0)
fl_in_aga(.(E, X), R, s(Z)) → U1_aga(E, X, R, Z, append_in_aag(E, Y, R))
append_in_aag([], X, X) → append_out_aag([], X, X)
append_in_aag(.(X, Xs), Ys, .(X, Zs)) → U3_aag(X, Xs, Ys, Zs, append_in_aag(Xs, Ys, Zs))
U3_aag(X, Xs, Ys, Zs, append_out_aag(Xs, Ys, Zs)) → append_out_aag(.(X, Xs), Ys, .(X, Zs))
U1_aga(E, X, R, Z, append_out_aag(E, Y, R)) → U2_aga(E, X, R, Z, fl_in_aga(X, Y, Z))
U2_aga(E, X, R, Z, fl_out_aga(X, Y, Z)) → fl_out_aga(.(E, X), R, s(Z))

The argument filtering Pi contains the following mapping:
fl_in_aga(x1, x2, x3)  =  fl_in_aga(x2)
[]  =  []
fl_out_aga(x1, x2, x3)  =  fl_out_aga(x1, x2, x3)
U1_aga(x1, x2, x3, x4, x5)  =  U1_aga(x3, x5)
append_in_aag(x1, x2, x3)  =  append_in_aag(x3)
append_out_aag(x1, x2, x3)  =  append_out_aag(x1, x2, x3)
.(x1, x2)  =  .(x1, x2)
U3_aag(x1, x2, x3, x4, x5)  =  U3_aag(x1, x4, x5)
U2_aga(x1, x2, x3, x4, x5)  =  U2_aga(x1, x3, x5)
s(x1)  =  s(x1)
APPEND_IN_AAG(x1, x2, x3)  =  APPEND_IN_AAG(x3)
FL_IN_AGA(x1, x2, x3)  =  FL_IN_AGA(x2)
U2_AGA(x1, x2, x3, x4, x5)  =  U2_AGA(x1, x3, x5)
U1_AGA(x1, x2, x3, x4, x5)  =  U1_AGA(x3, x5)
U3_AAG(x1, x2, x3, x4, x5)  =  U3_AAG(x1, x4, x5)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

Pi DP problem:
The TRS P consists of the following rules:

FL_IN_AGA(.(E, X), R, s(Z)) → U1_AGA(E, X, R, Z, append_in_aag(E, Y, R))
FL_IN_AGA(.(E, X), R, s(Z)) → APPEND_IN_AAG(E, Y, R)
APPEND_IN_AAG(.(X, Xs), Ys, .(X, Zs)) → U3_AAG(X, Xs, Ys, Zs, append_in_aag(Xs, Ys, Zs))
APPEND_IN_AAG(.(X, Xs), Ys, .(X, Zs)) → APPEND_IN_AAG(Xs, Ys, Zs)
U1_AGA(E, X, R, Z, append_out_aag(E, Y, R)) → U2_AGA(E, X, R, Z, fl_in_aga(X, Y, Z))
U1_AGA(E, X, R, Z, append_out_aag(E, Y, R)) → FL_IN_AGA(X, Y, Z)

The TRS R consists of the following rules:

fl_in_aga([], [], 0) → fl_out_aga([], [], 0)
fl_in_aga(.(E, X), R, s(Z)) → U1_aga(E, X, R, Z, append_in_aag(E, Y, R))
append_in_aag([], X, X) → append_out_aag([], X, X)
append_in_aag(.(X, Xs), Ys, .(X, Zs)) → U3_aag(X, Xs, Ys, Zs, append_in_aag(Xs, Ys, Zs))
U3_aag(X, Xs, Ys, Zs, append_out_aag(Xs, Ys, Zs)) → append_out_aag(.(X, Xs), Ys, .(X, Zs))
U1_aga(E, X, R, Z, append_out_aag(E, Y, R)) → U2_aga(E, X, R, Z, fl_in_aga(X, Y, Z))
U2_aga(E, X, R, Z, fl_out_aga(X, Y, Z)) → fl_out_aga(.(E, X), R, s(Z))

The argument filtering Pi contains the following mapping:
fl_in_aga(x1, x2, x3)  =  fl_in_aga(x2)
[]  =  []
fl_out_aga(x1, x2, x3)  =  fl_out_aga(x1, x2, x3)
U1_aga(x1, x2, x3, x4, x5)  =  U1_aga(x3, x5)
append_in_aag(x1, x2, x3)  =  append_in_aag(x3)
append_out_aag(x1, x2, x3)  =  append_out_aag(x1, x2, x3)
.(x1, x2)  =  .(x1, x2)
U3_aag(x1, x2, x3, x4, x5)  =  U3_aag(x1, x4, x5)
U2_aga(x1, x2, x3, x4, x5)  =  U2_aga(x1, x3, x5)
s(x1)  =  s(x1)
APPEND_IN_AAG(x1, x2, x3)  =  APPEND_IN_AAG(x3)
FL_IN_AGA(x1, x2, x3)  =  FL_IN_AGA(x2)
U2_AGA(x1, x2, x3, x4, x5)  =  U2_AGA(x1, x3, x5)
U1_AGA(x1, x2, x3, x4, x5)  =  U1_AGA(x3, x5)
U3_AAG(x1, x2, x3, x4, x5)  =  U3_AAG(x1, x4, x5)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 2 SCCs with 3 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APPEND_IN_AAG(.(X, Xs), Ys, .(X, Zs)) → APPEND_IN_AAG(Xs, Ys, Zs)

The TRS R consists of the following rules:

fl_in_aga([], [], 0) → fl_out_aga([], [], 0)
fl_in_aga(.(E, X), R, s(Z)) → U1_aga(E, X, R, Z, append_in_aag(E, Y, R))
append_in_aag([], X, X) → append_out_aag([], X, X)
append_in_aag(.(X, Xs), Ys, .(X, Zs)) → U3_aag(X, Xs, Ys, Zs, append_in_aag(Xs, Ys, Zs))
U3_aag(X, Xs, Ys, Zs, append_out_aag(Xs, Ys, Zs)) → append_out_aag(.(X, Xs), Ys, .(X, Zs))
U1_aga(E, X, R, Z, append_out_aag(E, Y, R)) → U2_aga(E, X, R, Z, fl_in_aga(X, Y, Z))
U2_aga(E, X, R, Z, fl_out_aga(X, Y, Z)) → fl_out_aga(.(E, X), R, s(Z))

The argument filtering Pi contains the following mapping:
fl_in_aga(x1, x2, x3)  =  fl_in_aga(x2)
[]  =  []
fl_out_aga(x1, x2, x3)  =  fl_out_aga(x1, x2, x3)
U1_aga(x1, x2, x3, x4, x5)  =  U1_aga(x3, x5)
append_in_aag(x1, x2, x3)  =  append_in_aag(x3)
append_out_aag(x1, x2, x3)  =  append_out_aag(x1, x2, x3)
.(x1, x2)  =  .(x1, x2)
U3_aag(x1, x2, x3, x4, x5)  =  U3_aag(x1, x4, x5)
U2_aga(x1, x2, x3, x4, x5)  =  U2_aga(x1, x3, x5)
s(x1)  =  s(x1)
APPEND_IN_AAG(x1, x2, x3)  =  APPEND_IN_AAG(x3)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APPEND_IN_AAG(.(X, Xs), Ys, .(X, Zs)) → APPEND_IN_AAG(Xs, Ys, Zs)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
APPEND_IN_AAG(x1, x2, x3)  =  APPEND_IN_AAG(x3)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

APPEND_IN_AAG(.(X, Zs)) → APPEND_IN_AAG(Zs)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof

Pi DP problem:
The TRS P consists of the following rules:

FL_IN_AGA(.(E, X), R, s(Z)) → U1_AGA(E, X, R, Z, append_in_aag(E, Y, R))
U1_AGA(E, X, R, Z, append_out_aag(E, Y, R)) → FL_IN_AGA(X, Y, Z)

The TRS R consists of the following rules:

fl_in_aga([], [], 0) → fl_out_aga([], [], 0)
fl_in_aga(.(E, X), R, s(Z)) → U1_aga(E, X, R, Z, append_in_aag(E, Y, R))
append_in_aag([], X, X) → append_out_aag([], X, X)
append_in_aag(.(X, Xs), Ys, .(X, Zs)) → U3_aag(X, Xs, Ys, Zs, append_in_aag(Xs, Ys, Zs))
U3_aag(X, Xs, Ys, Zs, append_out_aag(Xs, Ys, Zs)) → append_out_aag(.(X, Xs), Ys, .(X, Zs))
U1_aga(E, X, R, Z, append_out_aag(E, Y, R)) → U2_aga(E, X, R, Z, fl_in_aga(X, Y, Z))
U2_aga(E, X, R, Z, fl_out_aga(X, Y, Z)) → fl_out_aga(.(E, X), R, s(Z))

The argument filtering Pi contains the following mapping:
fl_in_aga(x1, x2, x3)  =  fl_in_aga(x2)
[]  =  []
fl_out_aga(x1, x2, x3)  =  fl_out_aga(x1, x2, x3)
U1_aga(x1, x2, x3, x4, x5)  =  U1_aga(x3, x5)
append_in_aag(x1, x2, x3)  =  append_in_aag(x3)
append_out_aag(x1, x2, x3)  =  append_out_aag(x1, x2, x3)
.(x1, x2)  =  .(x1, x2)
U3_aag(x1, x2, x3, x4, x5)  =  U3_aag(x1, x4, x5)
U2_aga(x1, x2, x3, x4, x5)  =  U2_aga(x1, x3, x5)
s(x1)  =  s(x1)
FL_IN_AGA(x1, x2, x3)  =  FL_IN_AGA(x2)
U1_AGA(x1, x2, x3, x4, x5)  =  U1_AGA(x3, x5)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof

Pi DP problem:
The TRS P consists of the following rules:

FL_IN_AGA(.(E, X), R, s(Z)) → U1_AGA(E, X, R, Z, append_in_aag(E, Y, R))
U1_AGA(E, X, R, Z, append_out_aag(E, Y, R)) → FL_IN_AGA(X, Y, Z)

The TRS R consists of the following rules:

append_in_aag([], X, X) → append_out_aag([], X, X)
append_in_aag(.(X, Xs), Ys, .(X, Zs)) → U3_aag(X, Xs, Ys, Zs, append_in_aag(Xs, Ys, Zs))
U3_aag(X, Xs, Ys, Zs, append_out_aag(Xs, Ys, Zs)) → append_out_aag(.(X, Xs), Ys, .(X, Zs))

The argument filtering Pi contains the following mapping:
[]  =  []
append_in_aag(x1, x2, x3)  =  append_in_aag(x3)
append_out_aag(x1, x2, x3)  =  append_out_aag(x1, x2, x3)
.(x1, x2)  =  .(x1, x2)
U3_aag(x1, x2, x3, x4, x5)  =  U3_aag(x1, x4, x5)
s(x1)  =  s(x1)
FL_IN_AGA(x1, x2, x3)  =  FL_IN_AGA(x2)
U1_AGA(x1, x2, x3, x4, x5)  =  U1_AGA(x3, x5)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

U1_AGA(R, append_out_aag(E, Y, R)) → FL_IN_AGA(Y)
FL_IN_AGA(R) → U1_AGA(R, append_in_aag(R))

The TRS R consists of the following rules:

append_in_aag(X) → append_out_aag([], X, X)
append_in_aag(.(X, Zs)) → U3_aag(X, Zs, append_in_aag(Zs))
U3_aag(X, Zs, append_out_aag(Xs, Ys, Zs)) → append_out_aag(.(X, Xs), Ys, .(X, Zs))

The set Q consists of the following terms:

append_in_aag(x0)
U3_aag(x0, x1, x2)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule FL_IN_AGA(R) → U1_AGA(R, append_in_aag(R)) at position [1] we obtained the following new rules:

FL_IN_AGA(x0) → U1_AGA(x0, append_out_aag([], x0, x0))
FL_IN_AGA(.(x0, x1)) → U1_AGA(.(x0, x1), U3_aag(x0, x1, append_in_aag(x1)))



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
QDP
                            ↳ Instantiation

Q DP problem:
The TRS P consists of the following rules:

U1_AGA(R, append_out_aag(E, Y, R)) → FL_IN_AGA(Y)
FL_IN_AGA(x0) → U1_AGA(x0, append_out_aag([], x0, x0))
FL_IN_AGA(.(x0, x1)) → U1_AGA(.(x0, x1), U3_aag(x0, x1, append_in_aag(x1)))

The TRS R consists of the following rules:

append_in_aag(X) → append_out_aag([], X, X)
append_in_aag(.(X, Zs)) → U3_aag(X, Zs, append_in_aag(Zs))
U3_aag(X, Zs, append_out_aag(Xs, Ys, Zs)) → append_out_aag(.(X, Xs), Ys, .(X, Zs))

The set Q consists of the following terms:

append_in_aag(x0)
U3_aag(x0, x1, x2)

We have to consider all (P,Q,R)-chains.
By instantiating [15] the rule U1_AGA(R, append_out_aag(E, Y, R)) → FL_IN_AGA(Y) we obtained the following new rules:

U1_AGA(.(z0, z1), append_out_aag(x1, x2, .(z0, z1))) → FL_IN_AGA(x2)
U1_AGA(z0, append_out_aag([], z0, z0)) → FL_IN_AGA(z0)



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Instantiation
QDP
                                ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

U1_AGA(z0, append_out_aag([], z0, z0)) → FL_IN_AGA(z0)
U1_AGA(.(z0, z1), append_out_aag(x1, x2, .(z0, z1))) → FL_IN_AGA(x2)
FL_IN_AGA(x0) → U1_AGA(x0, append_out_aag([], x0, x0))
FL_IN_AGA(.(x0, x1)) → U1_AGA(.(x0, x1), U3_aag(x0, x1, append_in_aag(x1)))

The TRS R consists of the following rules:

append_in_aag(X) → append_out_aag([], X, X)
append_in_aag(.(X, Zs)) → U3_aag(X, Zs, append_in_aag(Zs))
U3_aag(X, Zs, append_out_aag(Xs, Ys, Zs)) → append_out_aag(.(X, Xs), Ys, .(X, Zs))

The set Q consists of the following terms:

append_in_aag(x0)
U3_aag(x0, x1, x2)

We have to consider all (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


FL_IN_AGA(.(x0, x1)) → U1_AGA(.(x0, x1), U3_aag(x0, x1, append_in_aag(x1)))
The remaining pairs can at least be oriented weakly.

U1_AGA(z0, append_out_aag([], z0, z0)) → FL_IN_AGA(z0)
U1_AGA(.(z0, z1), append_out_aag(x1, x2, .(z0, z1))) → FL_IN_AGA(x2)
FL_IN_AGA(x0) → U1_AGA(x0, append_out_aag([], x0, x0))
Used ordering: Polynomial interpretation [25]:

POL(.(x1, x2)) = 1 + x1 + x2   
POL(FL_IN_AGA(x1)) = x1   
POL(U1_AGA(x1, x2)) = x2   
POL(U3_aag(x1, x2, x3)) = x1 + x3   
POL([]) = 0   
POL(append_in_aag(x1)) = x1   
POL(append_out_aag(x1, x2, x3)) = x2   

The following usable rules [17] were oriented:

append_in_aag(X) → append_out_aag([], X, X)
U3_aag(X, Zs, append_out_aag(Xs, Ys, Zs)) → append_out_aag(.(X, Xs), Ys, .(X, Zs))
append_in_aag(.(X, Zs)) → U3_aag(X, Zs, append_in_aag(Zs))



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Instantiation
                              ↳ QDP
                                ↳ QDPOrderProof
QDP
                                    ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

U1_AGA(.(z0, z1), append_out_aag(x1, x2, .(z0, z1))) → FL_IN_AGA(x2)
U1_AGA(z0, append_out_aag([], z0, z0)) → FL_IN_AGA(z0)
FL_IN_AGA(x0) → U1_AGA(x0, append_out_aag([], x0, x0))

The TRS R consists of the following rules:

append_in_aag(X) → append_out_aag([], X, X)
append_in_aag(.(X, Zs)) → U3_aag(X, Zs, append_in_aag(Zs))
U3_aag(X, Zs, append_out_aag(Xs, Ys, Zs)) → append_out_aag(.(X, Xs), Ys, .(X, Zs))

The set Q consists of the following terms:

append_in_aag(x0)
U3_aag(x0, x1, x2)

We have to consider all (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Instantiation
                              ↳ QDP
                                ↳ QDPOrderProof
                                  ↳ QDP
                                    ↳ UsableRulesProof
QDP
                                        ↳ QReductionProof

Q DP problem:
The TRS P consists of the following rules:

U1_AGA(.(z0, z1), append_out_aag(x1, x2, .(z0, z1))) → FL_IN_AGA(x2)
U1_AGA(z0, append_out_aag([], z0, z0)) → FL_IN_AGA(z0)
FL_IN_AGA(x0) → U1_AGA(x0, append_out_aag([], x0, x0))

R is empty.
The set Q consists of the following terms:

append_in_aag(x0)
U3_aag(x0, x1, x2)

We have to consider all (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

append_in_aag(x0)
U3_aag(x0, x1, x2)



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Instantiation
                              ↳ QDP
                                ↳ QDPOrderProof
                                  ↳ QDP
                                    ↳ UsableRulesProof
                                      ↳ QDP
                                        ↳ QReductionProof
QDP
                                            ↳ Instantiation

Q DP problem:
The TRS P consists of the following rules:

U1_AGA(z0, append_out_aag([], z0, z0)) → FL_IN_AGA(z0)
U1_AGA(.(z0, z1), append_out_aag(x1, x2, .(z0, z1))) → FL_IN_AGA(x2)
FL_IN_AGA(x0) → U1_AGA(x0, append_out_aag([], x0, x0))

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By instantiating [15] the rule U1_AGA(.(z0, z1), append_out_aag(x1, x2, .(z0, z1))) → FL_IN_AGA(x2) we obtained the following new rules:

U1_AGA(.(x0, x1), append_out_aag([], .(x0, x1), .(x0, x1))) → FL_IN_AGA(.(x0, x1))



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Instantiation
                              ↳ QDP
                                ↳ QDPOrderProof
                                  ↳ QDP
                                    ↳ UsableRulesProof
                                      ↳ QDP
                                        ↳ QReductionProof
                                          ↳ QDP
                                            ↳ Instantiation
QDP
                                                ↳ NonTerminationProof

Q DP problem:
The TRS P consists of the following rules:

U1_AGA(z0, append_out_aag([], z0, z0)) → FL_IN_AGA(z0)
FL_IN_AGA(x0) → U1_AGA(x0, append_out_aag([], x0, x0))
U1_AGA(.(x0, x1), append_out_aag([], .(x0, x1), .(x0, x1))) → FL_IN_AGA(.(x0, x1))

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

The TRS P consists of the following rules:

U1_AGA(z0, append_out_aag([], z0, z0)) → FL_IN_AGA(z0)
FL_IN_AGA(x0) → U1_AGA(x0, append_out_aag([], x0, x0))
U1_AGA(.(x0, x1), append_out_aag([], .(x0, x1), .(x0, x1))) → FL_IN_AGA(.(x0, x1))

The TRS R consists of the following rules:none


s = FL_IN_AGA(x0) evaluates to t =FL_IN_AGA(x0)

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

FL_IN_AGA(x0)U1_AGA(x0, append_out_aag([], x0, x0))
with rule FL_IN_AGA(x0') → U1_AGA(x0', append_out_aag([], x0', x0')) at position [] and matcher [x0' / x0]

U1_AGA(x0, append_out_aag([], x0, x0))FL_IN_AGA(x0)
with rule U1_AGA(z0, append_out_aag([], z0, z0)) → FL_IN_AGA(z0)

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.